﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Summer.Log
{
    /// <summary>
    /// The factory to get logger
    /// </summary>
    public sealed class LogFactory
    {
        /// <summary>
        /// Get new instance of logger
        /// </summary>
        /// <param name="name">The class name to log</param>
        /// <param name="isSaved">Whether to save log </param>
        /// <returns></returns>
        public static ILog GetLogger(string name, bool isSaved)
        {
            return new SimplyLogger(name, isSaved);
        }
        /// <summary>
        /// Get new instance of logger
        /// </summary>
        /// <param name="type">The class type to log</param>
        /// <param name="isSaved">Whether to save log </param>
        /// <returns></returns>
        public static ILog GetLogger(Type type, bool isSaved) 
        {
            return new SimplyLogger(type, isSaved); 
        }
        public static ILog GetLogger(string name)
        {
            return new SimplyLogger(name, false);
        }
        public static ILog GetLogger(Type type)
        {
            return new SimplyLogger(type, false);
        }
    }
}
